package com.ruoyi.cms.web.controller;

import com.ruoyi.system.service.impl.SysConfigServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@Controller
@RequestMapping("/cms/config")
public class CmsConfigController {

    @Autowired
    private SysConfigServiceImpl sysConfigService;

    private final String prefix = "blog/admin/config";
    //blog配置前缀
    private final String CONFIG_PREIGX="blog.config";

    @GetMapping
    public String config(ModelMap mm){

        mm.put("blogConfig",sysConfigService.selectConfigMap(CONFIG_PREIGX));
        return prefix+ "/config";
    }



}
